home *** CD-ROM | disk | FTP | other *** search
- /*
- ** This is the TScribbleDoc class declaration. This class is an adaptation of
- ** the class of the same name in the book, Elements of C++ Macintosh
- ** Programming, by Dan Weston.
- **
- ** Copyright © 1991 Mark Gross (gross@kaman.com and
- ** RR2, Box 84, Clayville, NY 13322);
- ** this file may be published everywhere, but no charge
- ** may be made for its use. Please contact me about any bugs found.
- ** I'm also looking for Macintosh development work, so drop me a line
- ** if you think I could help.
- */
-
- #define _H_TScribbleDoc
- #define min(A,B) ((A) < (B) ? (A) : (B) )
- #include "TDoc.h"
-
- typedef enum {patBlack, patGray, patWhite}penPat;
-
-
- struct TScribbleDoc:TDoc
- {
- PicHandle fPic;
- short fPenSize;
-
- penPat fPattern;
-
- /*
- ** new and modified member functions follow
- */
-
- TDoc* Init(OSType theCreator, SFReply *reply);
- void SetPenSize(short p);
- void SetPenPat(penPat P);
- short GetPenSize(void);
- penPat GetPenPat(void);
- void DoContent(EventRecord* theEvent);
- void Draw(Rect *r);
- OSType GetDocType(void);
- Boolean WriteDocFile(short refNum);
- Boolean ReadDocFile(short refNum);
- Boolean DoDocMenuCommand(short menuID, short menuItem);
- Boolean CanSaveAs(void);
- void AdjustDocMenus(void);
- void TogglePenMenu(Boolean enable);
- void Activate(void);
- void Deactivate(void);
- Boolean DoClose(void);
-
- };/* end of class decloration*/
-
-
-
-